<%@ page contentType="text/html; charset=utf-8" %>


<form id="searchForm" action="<c:url value='searchDefaultTemplateByPage.html' />" method="post">
<tr>
  <td>
    <table width="100%" border="0" cellpadding="0" cellspacing="5">
      <tr>
        <td>
          <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="dashTopLeft"><img src="images/spacer.gif" width="7" height="7"></td>
              <td class="dashTop" width=100%><img src="images/spacer.gif" width="7" height="7"></td>
              <td class="dashTopRight"><img src="images/spacer.gif" width="7" height="7"></td>
            </tr>
            <tr>
              <td class="dashLeft"><img src="images/spacer.gif" width="7" height="7"></td>
              <td align="center">
                <table width="100%" border="0" cellpadding="0" cellspacing="3">
			            <tr>
	                   <td width="114" height="20" class="globalTextBlueBold">模板查询</td>
	                   <td>&nbsp;</td>
	                   <td>&nbsp;</td>
			            </tr>
                  <tr>
                    <td width="5%" height="20" class="globalText">模板编号</td>
                    <td width="20%" height="20" class="globalText">
                    	<input type="text" class="txtbox" size="20" id="defaultTemplateIdTxt" name="defaultTemplateIdTxt" value=""/>
                    </td>
                    <td width="5%" height="20" class="globalText">模板描述</td>
                    <td width="20%" height="20" class="globalText">
                    	<input type="text" class="txtbox" size="20" id="defaultTemplateDescriptionTxt" name="defaultTemplateDescriptionTxt" value=""/>
                    </td>
                    <td width="5%" height="20" class="globalText">默认启用</td>
                    <td width="20%" height="20" class="globalText">
                    	<select name="enabledSlt">
                    	  <option value="">--请选择--</option>
                    	  <option value="1">是</option>
                    	  <option value="0">否</option>
                    	</select>
                    </td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td align="left"><input type="button" id="searchBtn" class="btnStyle" value="  查询  "></td>
                  </tr>
                </table>
              </td>
              <td class="dashRight"><img src="images/spacer.gif" width="7" height="7"></td>
            </tr>
            <tr>
              <td class="dashBottomLeft"><img src="images/spacer.gif" width="7" height="7"></td>
              <td class="dashBottom" width=100%><img src="images/spacer.gif" width="7" height="7"></td>
              <td class="dashBottomRight"><img src="images/spacer.gif" width="7" height="7"></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </td>
</tr>
</form>

<script type="text/javascript">
	$(document).ready(function() {
    var searchBtn = $("#searchBtn");
    var defaultTemplateIdTxt = $("#defaultTemplateIdTxt");
    var searchForm = $("#searchForm");
		
    defaultTemplateIdTxt.keypress(function(e) {
    	if (e.which == 13) {//回车按下
    		var defaultTemplateIdTxtVal =  $(this).val().trim();
    		defaultTemplateIdTxt.val(defaultTemplateIdTxtVal);
		    doSearch();
    		return false;
    	}
    });
	
    searchBtn.click(function() {
    	doSearch();						  
		});

		function doSearch() {
			var defaultTemplateIdTxtVal =  defaultTemplateIdTxt.val().trim();
    	defaultTemplateIdTxt.val(defaultTemplateIdTxtVal);
    	
	    searchForm.submit();
		}
	});
</script>